package com.huobi.pro.trade.rep;

import lombok.Data;

@SuppressWarnings("rawtypes")
@Data
public class $Result<T extends $Result> {
	private String status;
	private String message;

	public boolean isSuccess() {
		return "ok".equals(status);
	}

	@SuppressWarnings("unchecked")
	public T error() {
		setStatus("error");
		setMessage(message);
		return (T) this;
	}

	@SuppressWarnings("unchecked")
	public T error(String message) {
		setStatus("error");
		setMessage(message);
		return (T) this;
	}
}
